<template>
	<view class="prolist col_2">
		<view class="proitem" v-for="(item, index) of proList" :key="item.proid" @click="toDetail(item.proid)">
		  <view class="itemImage">
			<image :src="item.img1" alt=""></image>
		  </view>
		  <view class="itemInfo">
			<view>{{index}} - {{ item.proname }}</view>
			<view>{{ item.originprice }}</view>
		  </view>
		</view>
	  </view>
</template>

<script>
	export default {
		props: {
			proList: Array
		},
		name:"HomeList",
		data() {
			return {
				
			};
		},
		methods: {
			toDetail (proid) {
				uni.navigateTo({
					url: '/pages/detail/detail?proid=' + proid
				})
			}
		}
	}
</script>

<style lang="stylus">
.prolist
  .proitem
    background-color #fff
    display flex
    height 120px
    .itemImage
      width 120px
      height 120px
      image
        width 110px
        height 110px
        margin 5px
        display block
        // border 1px solid #ccc
    .itemInfo
      padding 5px 10px
      p
        color #333
  &.col_2
    display flex
    flex-wrap wrap
    .proitem
      width 48%
      height 240px
      margin 5px 1%
      display block
      .itemImage
        width 100%
        height 150px
        border 1px solid #ccc
        image
          width 100%
          margin 0
          height 150px
          display block
</style>
